package com.remiss.seckilldemo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.remiss.seckilldemo.mapper.GoodsMapper;
import com.remiss.seckilldemo.pojo.Goods;
import com.remiss.seckilldemo.service.IGoodsService;
import com.remiss.seckilldemo.vo.GoodsVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author remiss
 * @since 2021-04-03
 */
@Service
@Slf4j
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {
    @Autowired
    private GoodsMapper goodsMapper;
    /**
     * 获取商品列表
     * @return
     */
    @Override
    public List<GoodsVO> findGoodsVO() {

        return goodsMapper.findGoodsVO();
    }

    @Override
    public GoodsVO findGoodsVOByGoodsId(Long goodsId) {
        GoodsVO goodsVO =  goodsMapper.findGoodsVOByGoodsId(goodsId);
        return goodsVO;
    }
}
